package com.AO.DAO;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * FoodTypes entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "food_types", catalog = "delicacy")
public class FoodTypes implements java.io.Serializable {

	// Fields

	private String foodTypeId;
	private FoodTypes foodTypes;
	private String foodTypeName;
	private Integer foodTypeLevel;
	private String img;
	private Set<FoodFoodTypesRelation> foodFoodTypesRelations = new HashSet<FoodFoodTypesRelation>(
			0);
	private Set<FoodTypes> foodTypeses = new HashSet<FoodTypes>(0);

	// Constructors

	/** default constructor */
	public FoodTypes() {
	}

	/** minimal constructor */
	public FoodTypes(String foodTypeId, String foodTypeName,
			Integer foodTypeLevel) {
		this.foodTypeId = foodTypeId;
		this.foodTypeName = foodTypeName;
		this.foodTypeLevel = foodTypeLevel;
	}

	/** full constructor */
	public FoodTypes(String foodTypeId, FoodTypes foodTypes,
			String foodTypeName, Integer foodTypeLevel, String img,
			Set<FoodFoodTypesRelation> foodFoodTypesRelations,
			Set<FoodTypes> foodTypeses) {
		this.foodTypeId = foodTypeId;
		this.foodTypes = foodTypes;
		this.foodTypeName = foodTypeName;
		this.foodTypeLevel = foodTypeLevel;
		this.img = img;
		this.foodFoodTypesRelations = foodFoodTypesRelations;
		this.foodTypeses = foodTypeses;
	}

	// Property accessors
	@Id
	@Column(name = "food_type_id", unique = true, nullable = false, length = 50)
	public String getFoodTypeId() {
		return this.foodTypeId;
	}

	public void setFoodTypeId(String foodTypeId) {
		this.foodTypeId = foodTypeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Superior_directory")
	public FoodTypes getFoodTypes() {
		return this.foodTypes;
	}

	public void setFoodTypes(FoodTypes foodTypes) {
		this.foodTypes = foodTypes;
	}

	@Column(name = "food_type_name", nullable = false, length = 50)
	public String getFoodTypeName() {
		return this.foodTypeName;
	}

	public void setFoodTypeName(String foodTypeName) {
		this.foodTypeName = foodTypeName;
	}

	@Column(name = "food_type_level", nullable = false)
	public Integer getFoodTypeLevel() {
		return this.foodTypeLevel;
	}

	public void setFoodTypeLevel(Integer foodTypeLevel) {
		this.foodTypeLevel = foodTypeLevel;
	}

	@Column(name = "img")
	public String getImg() {
		return this.img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "foodTypes")
	public Set<FoodFoodTypesRelation> getFoodFoodTypesRelations() {
		return this.foodFoodTypesRelations;
	}

	public void setFoodFoodTypesRelations(
			Set<FoodFoodTypesRelation> foodFoodTypesRelations) {
		this.foodFoodTypesRelations = foodFoodTypesRelations;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "foodTypes")
	public Set<FoodTypes> getFoodTypeses() {
		return this.foodTypeses;
	}

	public void setFoodTypeses(Set<FoodTypes> foodTypeses) {
		this.foodTypeses = foodTypeses;
	}

}